#define _CRT_SECURE_NO_WARNINGS
//输入字符A和B比较谁多 哪个多输出哪个 若相等输出E
#include<stdio.h>
#include<string.h>
int main()
{
	int i = 0;
	int n = 0;
	int count = 0;
	char arr1[100] = { 0 };
	//输入
	gets(arr1);
	//统计
    while(arr1[i]!='0')
	{
		if (arr1[i] == 'A')
		{
			count++;
		}
		else
		{
			count--;
		}
		i++;
	}
	//输出
	if (count > 0)
	{
		printf("A\n");
	}
	else if (count < 0)
	{
		printf("B\n");
	}
	else
	{
		printf("E\n");
	}
	return 0;
}
//数数字
#include<stdio.h>
#include<string.h>
char s[10010];
int main()
{
    int a[10];
    int j;
    memset(a, 0, sizeof(a));
    scanf("%s", s);
    int n = strlen(s);
    for (int i = 0; i < n; i++)
    {
        j = s[i] - '0';
        ++a[j];
    }
    for (int i = 1; i <= 9; i++)
    {
        printf("%d ", a[i]);
    }
    return 0;
}